<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">  
    <!--  
    function reloadVerifyCode(){  
        document.getElementById('verifyCodeImage').setAttribute('src', '${pageContext.request.contextPath}/mydemo/getVerifyCodeImage');  
    }
    function login(){
    	$.ajax({
     		//请求类型，这里为POST
     		type: 'POST',
     		//你要请求的api的URL
     		url: url ,
     		//是否使用缓存
     		cache:false,
     		//数据类型，这里我用的是json
     		dataType: "json", 
     		//必要的时候需要用JSON.stringify() 将JSON对象转换成字符串
     		data: JSON.strigify({key:value}), //data: {key:value}, 
     		//添加额外的请求头
    		headers : {'Access-Control-Allow-Origin':'*'},
     		//请求成功的回调函数
     		success: function(data){
        	//函数参数 "data" 为请求成功服务端返回的数据
		},
		});
	}

    //-->  
    </script>  
  </head>
  
  <body>
        <div style="color:red; font-size:22px;">${message_login}</div>  
      
    <form action="<%=request.getContextPath()%>/SysUser/login" method="POST">  
        姓名：<input type="text" name="username"/><br/>  
        密码：<input type="text" name="password"/><br/>  
	<input type="submit" value="确认" onclick="javascript:login();"/>  
    </form> 
  </body>
</html>
